<div class="main-content shadow">
            <div class="label-title"><b> ข้อมูลกิจกรรม</b></div>
                    <div style="height:30px"></div>
                    <?php ob_start(); ?>
                    <table style="margin: 0 auto" class="formtable"  width="680" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <th colspan="2" align="center" valign="middle">&nbsp;ข้อมูลอาจารย์</th>
                      </tr>
                      <tr>
                        <th width="177" align="right" valign="middle">&nbsp;ชื่อ-นามสกุล :</th>
                        <td width="423" align="left" valign="middle">&nbsp;<b><?=$teacher_datay->teacher_name?></b></td>
                      </tr>
                      <tr>
                        <th align="right" valign="middle">&nbsp;รหัสอาจารย์ :</th>
                        <td align="left" valign="middle">&nbsp;<?=$teacher_datay->teacher_code?></td>
                      </tr>
                      <tr>
                        <th align="right" valign="middle">&nbsp;โปรแกรมวิชา :</th>
                        <td align="left" valign="middle">&nbsp;<?=$teacher_datay->major_title?></td>
                      </tr>
                      <tr>
                        <th align="right" valign="middle">&nbsp;พิมพ์ :</th>
                        <td align="left" valign="middle">&nbsp;
                            <a  target="_blank"  href="<?=base_url()?>teacher/print_teacher_activity_display/ID/<?=$ID?>">
                            <input class="button-x orange autosize" type="button" value="  พิมพ์ ">
                            </a>
                        </td>
                      </tr>
                    </table>
                    <?php $teacher_content = ob_get_contents();
                                                  ob_end_clean(); 
                                    echo $teacher_content;
                    ?>
                    <div style="height:30px"></div>
                    <?php ob_start(); ?>
                    <table style="margin: 0 auto"  align="center"  class="formtable" width="94%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <th colspan="8" align="center" valign="middle">
                            &nbsp;<b>แสดงข้อมูลการดูแลกิจกรรม <?=$teacher_activity->num_rows()?>  รายการ</b>
                        </th>
                      </tr>
                      <tr>
                        <th width="2%" align="center" valign="middle">ลำดับ</th>
                        <th width="13%" align="center" valign="middle">ชื่อกิจกรรม</th>
                        <th width="5%" align="center" valign="middle">เริ่มลงทะเบียน</th>
                        <th width="6%" align="center" valign="middle">สิ้นสุดลงทะเบียน</th>
                        <th width="6%" align="center" valign="middle">เริ่มกิจกรรม</th>
                        <th width="6%" align="center" valign="middle">สิ้นสุดกิจกรรม</th>
                      </tr>
                      <?php $no = 1; ?>
                      <?php foreach($teacher_activity->result_array() as $row){  ?>
                      <tr>
                        <td align="center" valign="middle">&nbsp;<b><?=$no?></b></td>
                        <td align="left" valign="middle">&nbsp;<?=$row["act_title"]?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_start_reg_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_end_reg_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_start_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_end_date"])?></td>
                      </tr>
                      <?php $no++;} ?>
                    </table>
                    <?php $content= ob_get_contents();
                                                  ob_end_clean(); 
                                    echo $content;
                                    @file_put_contents("res/temp/rp001.xls", $teacher_content . $content);
                               
                    ?>
                    <div style="height:30px"></div>
</div>
<iframe  style="display: none"  name="download"></iframe>
